 <%@page import="java.sql.*,org.opencms.db.*,org.opencms.main.*"%>
 <% java.sql.Connection con = OpenCms.getSqlManager().getConnection("yourdb");
    PreparedStatement pstmt = con.prepareStatement("SELECT `id`,`姓名`,`信件分类`,`标题` FROM mail where `id`=?");  
	String idnum=request.getParameter("id");
	pstmt.setString(1,idnum);
	ResultSet rs;

    rs = pstmt.executeQuery(); 
    while (rs.next()) {
     out.println("<span>"+rs.getString(1)+"</span>"+"<span>"+rs.getString(2)+"</span>"+"<span>"+rs.getString(3)+"</span>"+"<span>"+rs.getString(4)+"</span>");	
    }
 
    rs.close();
    pstmt.close();
 
    con.close();
 %>